# Maintainer: Morten Linderud <foxboron@archlinux.org>

pkgname='jp2a'
pkgver=1.1.1
pkgrel=1
pkgdesc='A small utility for converting JPG images to ASCII'
arch=('loong64' 'x86_64')
url='https://github.com/Talinx/jp2a/'
license=('GPL2')
depends=('curl' 'libjpeg' 'libpng')
makedepends=('doxygen' 'autoconf-archive' 'git')
_commit=9ed01d6aa57c5b63657abe5c76cd28935206084c	#refs/tags/v1.1.0
source=("git+https://github.com/Talinx/jp2a.git#commit=${_commit}?signed")
validpgpkeys=("5FCAE86E581E73AD91CB3235E7DBBCF6B02920CC") # Christoph Raitzig
sha256sums=('SKIP')

prepare(){
  cd "${pkgname}"
  autoreconf -vi
}

build(){
  cd "${pkgname}"
  bashcompdir=/usr/share/bash-completion/completions ./configure --prefix='/usr'
  make
}

check() {
  cd "${pkgname}"
  make check
}

package(){
  cd "${pkgname}"
  make DESTDIR="${pkgdir}" install
}
